/* jsx ctrl+m*/
import React, { Component } from 'react';
import Header from './components/Header';
import Bottom from './components/Bottom';
// import './css/index.css';
class App extends Component {
  constructor(props) {
    /* 组件的构造函数中一定要加上super */
    super(props);
    this.state = {
      msg: "hello react",
      header: "react-header"
    }
  }
  render() {
    return (
      /* html的class写成className */
      <div className="item">
        <Header data={this.state.header}></Header>
        <Bottom myRun={this.run}></Bottom>
      </div>
    );
  }
  run(params) {
    console.log(params);
  }
}
export default App;


